"use strict";
/**
 * @author wangchenzhao
 * @date 2018/11/20
 */
module.exports = app => {
  const { router, controller } = app;

  // // v1校验规则
  // const rules = validate.v1;

  // // 路由统一前缀
  // const newRouter = router.namespace('/v1/api');

  // // 路由中间价
  // const checkParams = app.middleware.checkParams('v1');
  // const checkToken = app.middleware.checkToken;


  // 请求
  router.get('/', controller.mysqlTable.home);
  router.get('/*.html', controller.mysqlTable.toHtml);
  router.get('/DBlist.html', controller.dbcontroller.getDBlist);
  router.get('/table_list.html', controller.dbcontroller.getTablesByDataBase);
  router.get('/table_data_list.html', controller.dbcontroller.getOneTableData);

  router.get('/getAllDataBses', controller.mysqlTable.getAllDataBses);
  router.get('/getTablesByDataBase', controller.mysqlTable.getTablesByDataBase);
  router.get('/getDetailByTabName', controller.mysqlTable.getDetailByTabName);
  router.get('/getDetailByTabNames', controller.mysqlTable.getDetailByTabNames);
  router.get('/getTablesData', controller.mysqlTable.getTablesData);
  router.get('/getOneTableData', controller.mysqlTable.getOneTableData);
  router.get('/getSqlByTabNames', controller.mysqlTable.getSqlByTabNames);


}